/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package BL;

import BE.BEInterface;
import DA.DAInterface;
import java.util.ArrayList;

/**
 *
 * @author hunter2409
 */
public class BLInterface {
    
    private ArrayList<BEInterface> lstInterfaces;
    private DAInterface dtaInterface;
    
    public BLInterface()
    {
        lstInterfaces= new ArrayList<BEInterface>();
        dtaInterface= new DAInterface();
                
    }
    
    public void cargar()
    {
        setLstInterfaces(getDtaInterface().obtenerInterfaces());
        
    }

    public ArrayList<BEInterface> getLstInterfaces() {
        return lstInterfaces;
    }

    public void setLstInterfaces(ArrayList<BEInterface> lstInterfaces) {
        this.lstInterfaces = lstInterfaces;
    }

    public DAInterface getDtaInterface() {
        return dtaInterface;
    }

    public void setDtaInterface(DAInterface dtaInterface) {
        this.dtaInterface = dtaInterface;
    }

    public BEInterface buscarId(Integer i) {
        for (BEInterface aux:lstInterfaces)
        {
            if (aux.getIdInterface()==i) return aux;
        }
        
        return null;
    }
    
    
}
